This document contains some analysis of the previously cleaned seed data.
This analysis was performed using R version 4.4.1 (2024-06-14 ucrt). The tidyverse suite of packages was used for data manipulation and visualisation. The emmeans package was used for model predictions.
The cleaned data is read in. There is the full dataset followed by the dataset that has been summarised (over the unbalanced reps).
## tibble [4,316 × 15] (S3: tbl_df/tbl/data.frame)
## $ Year : Factor w/ 3 levels "2021-2022","2022-2023",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Farm : Factor w/ 19 levels "Ahuriri","Ashford 1",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ Property_Grouping : Factor w/ 18 levels "Ahuriri","Ashford_1",..: 6 6 6 6 6 6 6 6 6 6 ...
## $ PK_Boundary : Factor w/ 10 levels "Bare_fence","Control_farm",..: 1 1 1 1 1 1 1 2 2 2 ...
## $ Simplified_Boundary : Factor w/ 4 levels "Old native","New native",..: 3 3 3 3 3 3 3 4 4 4 ...
## $ Very_Simplified_Boundary: Factor w/ 2 levels "Bare_fence","Mixed_native": 1 1 1 1 1 1 1 1 1 1 ...
## $ Planting_date : chr [1:4316] "*" "*" "*" "*" ...
## $ Treatment : Factor w/ 3 levels "Hand pollinated",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Colour : logi [1:4316] NA NA NA NA NA NA ...
## $ Rep : num [1:4316] 2 2 2 2 1 1 1 2 2 2 ...
## $ Number_of_Pods : chr [1:4316] "10" "10" "10" "10" ...
## $ Pod_number : chr [1:4316] "7" "10" "3" "1" ...
## $ Seed viable : num [1:4316] 13 12 12 10 13 15 16 16 11 12 ...
## $ Seed inviable : num [1:4316] 0 0 1 0 0 0 0 0 0 0 ...
## $ Type_of_farm : Factor w/ 2 levels "Arable","Dairy": 2 2 2 2 2 2 2 2 2 2 ...
Next the previously saved summarised data is loaded.
## tibble [319 × 6] (S3: tbl_df/tbl/data.frame)
## $ Year : Factor w/ 3 levels "2021-2022","2022-2023",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Farm : Factor w/ 19 levels "Ahuriri","Ashford 1",..: 1 1 1 1 1 2 2 2 2 2 ...
## $ Type_of_farm : Factor w/ 2 levels "Arable","Dairy": 1 1 1 1 1 2 2 2 2 2 ...
## $ Simplified_Boundary: Factor w/ 4 levels "Old native","New native",..: 2 2 2 4 4 2 2 2 4 4 ...
## $ Treatment : Factor w/ 3 levels "Hand pollinated",..: 1 2 3 1 2 1 2 3 1 2 ...
## $ Mean_seeds_viable : num [1:319] 16.2 14.8 1 16.2 10.4 ...
Next we further summarise the data and calculate the means for each Year, Simplified_Boundary and Treatment combination (the black dots in the second and third graphs below).
The details of the particular farms is not of interest so we remove this information and add the overall means to the plots.
The two plots below are the same, just with minor differences (HP abbreviation and the size of the points).
First we look at the data in a single graph and then with the farm types separated.
We fit linear mixed-effect models to the two sets of data. The response is Mean_seeds_viable. The fixed-effects are Treatment and Simplified_Boundary plus their two-way interaction. Year is not really of interest (I hope?) so we make it a random effect. There is also a random effect for Farm nested in Year. This means that there are 3 levels to the Year random effect, and 24 for the Farm:Year random effect (and it doesn’t matter that we don’t have data from every farm for each year).
Two outliers were removed from the data to better satisfy modelling assumptions.
If the outliers are included in the model, the story is the same (results not shown).
The ANOVA table is:
| Chisq | Df | Pr(>Chisq) | |
|---|---|---|---|
| Treatment | 70.52435 | 1 | 0.000000 |
| Simplified_Boundary | 20.66522 | 2 | 0.000033 |
| Treatment:Simplified_Boundary | 15.83355 | 2 | 0.000365 |
The two-way interaction is significant. The modelled/predicted means and 95% confidence intervals are graphed and given in a table. Note that the post-hoc pairwise comparison p-values were adjusted using the False Discovery Rate (FDR) correction to account for multiple tests.
| Simplified_Boundary | Treatment | Predicted mean | lower.CL | upper.CL |
|---|---|---|---|---|
| Old native | Hand pollinated | 17.05 | 8.97 | 25.13 |
| New native | Hand pollinated | 18.02 | 9.80 | 26.24 |
| Bare fence | Hand pollinated | 17.01 | 8.77 | 25.25 |
| Old native | Open | 15.87 | 7.79 | 23.95 |
| New native | Open | 15.28 | 6.93 | 23.63 |
| Bare fence | Open | 12.52 | 4.41 | 20.64 |
## Treatment = Hand pollinated:
## contrast estimate SE df t.ratio p.value
## Old native - New native -0.9725 0.673 67.3 -1.444 0.2301
## Old native - Bare fence 0.0333 0.598 50.5 0.056 0.9558
## New native - Bare fence 1.0058 0.646 65.9 1.558 0.2301
##
## Treatment = Open:
## contrast estimate SE df t.ratio p.value
## Old native - New native 0.5961 0.663 67.6 0.899 0.3718
## Old native - Bare fence 3.3524 0.613 51.1 5.465 <.0001
## New native - Bare fence 2.7563 0.646 65.9 4.269 0.0001
##
## Degrees-of-freedom method: kenward-roger
## P value adjustment: fdr method for 3 tests
The table above shows pairwise Simplified_Boundary comparisons for each of the Treatments. There is no difference for Hand pollinated. For Open the New native and Old native each have approximately 3 more viable seeds on average than the Bare fence. There is no difference between New native and Old native.
The ANOVA table is:
| Chisq | Df | Pr(>Chisq) | |
|---|---|---|---|
| Simplified_Boundary | 25.565 | 2 | 0.000 |
| Treatment | 32.257 | 1 | 0.000 |
| Simplified_Boundary:Treatment | 9.679 | 2 | 0.008 |
The two-way interaction is significant. The modelled/predicted means and 95% confidence intervals are graphed and given in a table.
| Simplified_Boundary | Treatment | Predicted mean | lower.CL | upper.CL |
|---|---|---|---|---|
| Old native | Hand pollinated | 17.68 | 10.29 | 25.07 |
| New native | Hand pollinated | 17.37 | 11.46 | 23.29 |
| Bare fence | Hand pollinated | 16.64 | 9.81 | 23.48 |
| Old native | Open | 16.43 | 9.04 | 23.82 |
| New native | Open | 15.11 | 9.20 | 21.03 |
| Bare fence | Open | 12.30 | 5.46 | 19.13 |
## Treatment = Hand pollinated:
## contrast estimate SE df t.ratio p.value
## Old native - New native 0.303 0.896 79.5 0.338 0.7363
## Old native - Bare fence 1.033 0.719 67.8 1.437 0.4664
## New native - Bare fence 0.730 0.935 77.1 0.781 0.6559
##
## Treatment = Open:
## contrast estimate SE df t.ratio p.value
## Old native - New native 1.315 0.896 79.5 1.467 0.1464
## Old native - Bare fence 4.132 0.719 67.8 5.747 <.0001
## New native - Bare fence 2.818 0.935 77.1 3.014 0.0052
##
## Degrees-of-freedom method: kenward-roger
## P value adjustment: fdr method for 3 tests
The table above shows pairwise Simplified_Boundary comparisons for each of the Treatments. There is no difference for Hand pollinated.
For Open, the New native have approximately 3 more viable seeds on average than the Bare fence. The Old native have approximately 4 more viable seeds on average than the Bare fence. There is no difference between New native and Old native.
Comments